package com.ldx.function;

import java.util.function.Consumer;

/**
 * @author lidexin
 * @create 2021-10-16 21:22
 */
public class Demo03 {
    public static void main(String[] args) {
//         Consumer<String> consumer = new Consumer<String>() {
//             @Override
//             public void accept(String str) {
//                 System.out.println(str);
//             }
//         };

         Consumer<String> consumer = str -> { System.out.println(str);};
         consumer.accept("asd");
    }
}
